<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<img id="imgTag" src="" alt="imgTag">
	</body>
</html>
<script type="text/javascript">
	var ws = new WebSocket("ws://localhost:8080/webSocket");
	 
	ws.onopen = function(evt) {
		console.log("Connection open ...");
		ws.send("Hello WebSockets!");
	};
	 
	ws.onmessage = function(evt) {
		document.getElementById('imgTag').src = evt.data;
	};
	 
	ws.onclose = function(evt) {
		console.log("Connection closed.");
	};
</script>
